package spring.study.annotation;

import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import spring.study.annotation.cofig.MainConfig2;
import spring.study.annotation.cofig.MainConfigOfLifeCycle;

/**
 * @author study
 * @version 1.0
 * @date 2020/6/19 17:15
 */
public class IOCTestLifeCycle {

    AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(MainConfigOfLifeCycle.class);

    @Test
    public void test01() {

        context.getBean("car");
        context.close();

    }

}
